home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_319
/
cnewssrc
/
cnews.src.lzh
/
input
/
rnews.batch
< prev
next >
Wrap
Text File
|
1980-01-01
|
1KB
|
42 lines
#! /bin/sh
# Incoming-news spooling.
# We ignore arguments -- it looks tempting to put "$*" after cat and
# newsspool, but there are security problems.
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/input:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
# check space, assuming a pretty large batch (no cheap way to find real size)
counter=1
while test " `spacefor 250000 incoming`" -le 0
do
sleep 300
if test " $counter" -gt 1111 # four tries is plenty
then
# oh no! -- nothing we can do, really...
cat >/dev/null
echo incoming news discarded due to space shortage |
mail "$NEWSMASTER"
exit 1
fi
counter="1$counter"
done
if newsspool >/tmp/ngripe.$$ 2>&1 # qqq (marker for Makefile)
then
rm -f /tmp/ngripe.$$
exit 0
else
# there really isn't any way to save the data if newsspool fails,
# not without causing other problems
(
echo newsspool failed!!!
cat /tmp/ngripe.$$
) | mail "$NEWSMASTER"
rm -f /tmp/ngripe.$$
exit 1
fi